import http from '@/utils/http'
import {MenuAdd} from './MenuModules'
enum Api{
  getMenuList='/menu/tree/manager',
  menuAdd='/menu/save',
  menuRemove='/menu/remove',
}
/**
 * 菜单删除
 */
export const menuRemoveApi=async(id)=>{
  return http.deleteApi(Api.menuRemove,id)
}
/**
 * 菜单新增
 */
export const menuAddApi=async(params:MenuAdd)=>{
  return http.post(Api.menuAdd,params)
}
/**
 * 
 * @returns 菜单名称
 */
export const getMenuListApi=async ()=>{
  return http.get(Api.getMenuList)
} 